home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Special 23
/
AMIGAplus Sonderheft 23 (2000)(Falke)(DE)[!].iso
/
Tools
/
Packer
/
xad
/
Developer
/
Include
/
Autodocs
/
xadmaster.doc
next >
Wrap
Text File
|
1999-11-06
|
23KB
|
644 lines
TABLE OF CONTENTS
xadmaster.library/--general--
xadmaster.library/xadAllocObject
xadmaster.library/xadConvertDates
xadmaster.library/xadDiskUnArc
xadmaster.library/xadFileUnArc
xadmaster.library/xadFreeInfo
xadmaster.library/xadFreeObject
xadmaster.library/xadGetClientInfo
xadmaster.library/xadGetErrorText
xadmaster.library/xadGetInfo
xadmaster.library/xadHookAccess
xadmaster.library/xadRecogFile
xadmaster.library/--tags--
xadmaster.library/--data hooks--
VERSION
$VER: xadmaster.doc 1.0 (07.09.1998) by SDI
xadmaster.library/--general-- xadmaster.library/--general--
When unachiving a archive you need to do following steps always
1) Allocate a "struct xadArchiveInfo" with a call to
xadAllocObject(XADOBJ_ARCHIVEINFO, 0). This structure is the master
interface and must not by modified in any way. Nearly all other
functions you may use need to get the pointer this this structure.
All data is passed with tags!
1) Call xadGetInfo() to find out if the input data is archived. If it
is, the xadArchiveInfo structure is filled with lots of information.
See xadGetInfo description to see what you may read and what stuff
not. One of the input tags must be specified here.
2) For every file in a file archive or every disk call xadFileUnArc() or
xadDiskUnArc() with one tag XAD_ENTRYNUMBER set to wanted entry. One
of the output tags must be specified here. Passwords and other stuff
is additionally allowed.
3) Call xadFreeInfo() to free the stuff allocated with xadGetInfo.
4) Use xadFreeObject() to free the xadArchiveInfo structure.
Do not use one xadArchiveInfo file structure for multiple input files!
ANY needed structure must be allocated with xadAllocObject! None of
the xadmaster structures can be allocated any other way!
xadmaster.library/xadAllocObject xadmaster.library/xadAllocObject
NAME
xadAllocObject - Allocate memory for all xad related structures
SYNOPSIS
ptr = xadAllocObjectA(type, tags)
D0 D0 A0
APTR xadAllocObjectA(ULONG, struct TagItem *)
ptr = xadAllocObject(type, tag1, ...)
APTR xadAllocObject(ULONG, Tag, ...)
FUNCTION
This function allocates the memory of a needed xad related
structure and initializes it. You need to use this function to
allocate the structures. Any other way of allocating is not
allowed.
INPUT
type - in libraries/xadmaster.h defined XADOBJ_... types.
For example XADOBJ_FILEINFO allocates xadFileInfo
structure.
tags - Pointer to an array of struct TagItem. Recognized tags:
XAD_OBJNAMESIZE, XAD_OBJCOMMENTSIZE, XAD_OBJBLOCKENTRIES
RESULT
ptr - Pointer to required structure or 0 when an error occured.
SEE ALSO
libraries/xadmaster.h, xadFreeObject(), tags section
xadmaster.library/xadConvertDates xadmaster.library/xadConvertDates
NAME
xadConvertDates - convert between date storage methods
SYNOPSIS
result = xadConvertDatesA(tags)
D0 A0
LONG xadConvertDates(struct TagItem *)
result = xadConvertDates(tag1, ...)
LONG xadConvertDates(Tag, ...)
FUNCTION
This function can be used to transfrom date and time between
different storage systems. One of the input tags must be specified.
Output tags may be specified multiple. The date information is
based on Gregorian calendar. Some systems can store a wider range
of dates than others. If a date produces an overflow or an
underflow for a special date, the highest/lowest valid date is used
(e.g. for timevalues 0x00000000 or 0xFFFFFFFF).
The UNIXUTC date needs locale.library to get the offset to local
time. If locale.library cannot be opened the offset is set to 0.
XAD_DATECURRENTTIME can be used to get the current system date and
time.
WeekDay information is ignored for input and always recalculated.
The calculation routines use full range of available variable space,
so f.e. a Unix date 1.1.1970 00:00:00 (value 0x00000000) with a
UTC offset of -30 min produces 31.12.1968 23:30:00.
INPUT
ai - the master communication structure
tags - Pointer to an array of struct TagItem. Recognized tags:
XAD_DATEUNIXUTC, XAD_DATEAMIGA, XAD_DATEDATESTAMP,
XAD_DATEXADDATE, XAD_DATECLOCKDATA, XAD_DATECURRENTTIME,
XAD_GETDATEUNIXUTC, XAD_GETDATEAMIGA,
XAD_GETDATEDATESTAMP, XAD_GETDATEXADDATE,
XAD_GETDATECLOCKDATA
RESULT
result - any of the XADERR codes or zero when all is ok.
SEE ALSO
libraries/xadmaster.h, tags section
xadmaster.library/xadDiskUnArc xadmaster.library/xadDiskUnArc
NAME
xadDiskUnArc - the master function for unarchiving disks
SYNOPSIS
result = xadDiskUnArcA(ai, tags)
D0 A0 A1
LONG xadDiskUnArc(struct xadArchiveInfo *, struct TagItem *)
result = xadDiskUnArc(ai, tag1, ...)
LONG xadDiskUnArc(struct xadArchiveInfo *, Tag, ...)
FUNCTION
This function dearchives a disk archive. It can be called after
a succesful call to xadGetInfo. At least the tag XAD_ENTRYNUMBER
and one of the output tags needs to be supplied. When a progress
hook is supplied, this can be used for questioning for overwriting
and ignoring of drive geometry and for status displays.
Normally disk archivers will have only one entry, but there may
be multiple disk archives.
INPUT
ai - the master communication structure
tags - Pointer to an array of struct TagItem. Recognized tags:
XAD_ENTRYNUMBER, XAD_OUTFILEHANDLE, XAD_OUTFILENAME,
XAD_OUTHOOK, XAD_OUTMEMORY, XAD_OUTSIZE, XAD_OVERWRITE,
XAD_PROGRESSHOOK, XAD_IGNOREGEOMETRY, XAD_HIGHCYLINDER,
XAD_LOWCYLINDER, XAD_OUTDEVICE, XAD_PASSWORD
RESULT
result - any of the XADERR codes or zero when all is ok.
SEE ALSO
libraries/xadmaster.h, xadFileUnArc(), xadGetInfo(), tags section
xadmaster.library/xadFileUnArc xadmaster.library/xadFileUnArc
NAME
xadFileUnArc - the master function for unarchiving disks
SYNOPSIS
result = xadFileUnArcA(ai, tags)
D0 A0 A1
LONG xadFileUnArc(struct xadArchiveInfo *, struct TagItem *)
result = xadFileUnArc(ai, tag1, ...)
LONG xadFileUnArc(struct xadArchiveInfo *, Tag, ...)
FUNCTION
This function dearchives a file archive entry. It can be called
after a succesful call to xadGetInfo. At least the tag
XAD_ENTRYNUMBER and one of the output tags needs to be supplied.
When a progress hook is supplied, this can be used for questioning
for overwriting and for status displays.
This function needs to be called for every file, which should be
unarchived. Best is to do unarchiving in direction giving by
info structure, because some archivers crunch multiple files in one
pass and the unarchiver needs to compress and buffer the whole
pass to get one file.
INPUT
ai - the master communication structure
tags - Pointer to an array of struct TagItem. Recognized tags:
XAD_ENTRYNUMBER, XAD_OUTFILEHANDLE, XAD_OUTFILENAME,
XAD_OUTHOOK, XAD_OUTMEMORY, XAD_OUTSIZE, XAD_OVERWRITE,
XAD_PROGRESSHOOK, XAD_PASSWORD
RESULT
result - any of the XADERR codes or zero when all is ok.
SEE ALSO
libraries/xadmaster.h, xadDiskUnArc(), xadGetInfo(), tags section
xadmaster.library/xadFreeInfo xadmaster.library/xadFreeInfo
NAME
xadFreeInfo - free stuff built and allocated with xadGetInfo()
SYNOPSIS
xadFreeInfo(ai)
A0
void xadFreeInfo(struct xadArchiveInfo *)
FUNCTION
Frees all the stuff built and allocated by a call to xadGetInfo().
You always need to call this after your work with a certain input
file is finished.
INPUTS
ai - the master communication structure
SEE ALSO
libraries/xadmaster.h, xadGetInfo(), tags section